<script lang="ts">
import {defineComponent, PropType} from "vue"
import {getJsonValue} from "@/units/tool";
export default defineComponent({
  name: "JsonValue",
  props: {
    data: {
      type: Object,
      required: true
    },
    property: {
      type: [String, Array] as PropType<string | string[]>,
      required: true
    }
  },
  setup(props) {
    return () => (props.data && props.property) ? getJsonValue(props.data, props.property, '') : ''
  }
})
</script>

<template>

</template>

<style scoped lang="scss">

</style>